<template>
	<div>
		这里是首页  <router-link to='/about'>about page</router-link>
		<div class="form-control">
			<input type="search" v-model="search"> <button @click="order">请求</button>
		</div>
		<div class="v-form">
			<div class="form-item">
				<div class="label">名字</div>
				<input type="text" placeholder="请输入名字">
			</div>
		</div>
		<countTo startVal="100" endVal="3000"></countTo>
	</div>
</template>

<script>
	import countTo from '@/components/count_to.vue'
	export default {
		name:'index',
		data:function(){
			return {
				search:''
			}
		},
		components: {
			countTo
		},
		methods:{
			order(){
				this.$axios.get('/s',{wd:this.search,oq:this.search}).then(function(res){
					console.log("succ",res)
				}).catch((err)=>{
					console.warn("错误",err)
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	@mixin heightCenter($height) {
		height:$height+px;
		line-height: $height+px;
	}
	@mixin container($width:15px){
		padding-left:$width;
		padding-right:$width;
	}
	.v-form{
		.form-item{
			@include heightCenter(36);
			@include container();
			display: flex;
			justify-items: left;
			border-bottom:1px solid #E2E2E2;
			.label{
				width: 80rpx;
			}
		}
	}
	
</style>
